<template>
  <div class="grandChild">
    <h3>我是孙组件GrandChild</h3>
    接收到祖先组件的数据为:{{ message }}
  </div>
</template>

<script setup lang="ts">
import { ref, inject } from 'vue'
const message = ref('')
message.value = inject('message')
</script>

<style scoped>
.grandChild {
  width: 300px;
  height: 300px;
  background: lightpink;
}
</style>
